<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>{$activity_info.jsonstr.activity_title}</title>
    <link rel="stylesheet" type="text/css" href="{$Think.config.RESOURCEURL}wx_assets/womenday/css/wemenday.css{$Think.config.RESOURCE_VER}" />
    <script src="{$Think.config.RESOURCEURL}wx_assets/womenday/js/remApp.js" type="text/javascript" charset="utf-8"></script>
   
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/layer.m.js" type="text/javascript" charset="utf-8"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/common.js{$Think.config.RESOURCE_VER}" type="text/javascript" charset="utf-8"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js" type="text/javascript" charset="utf-8"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/womenday/js/wx_share.js{$Think.config.RESOURCE_VER}" type="text/javascript" charset="utf-8"></script>

     <script src="{$Think.config.RESOURCEURL}wx_assets/womenday/js/main.js{$Think.config.RESOURCE_VER}" type="text/javascript" charset="utf-8"></script>
     <script type="text/javascript">
         var partake="{$partake_id}";
         checkPartake(partake);
     </script>
</head>

<body>
    <ul>
        <volist name="activity_info.jsonstr.activity_index_img.src" id="value">
            <li>
                <img src="{$value}" alt="">
            </li>
        </volist>
    </ul>
    <div class="btn">
        <img src="{$activity_info.jsonstr.activty_index_button.src}" />
    </div>
</body>
<script type="text/javascript">
var baseUrl = "{$Think.config.SERVER_HOST}";

if($.util.getParam("fromUserId"))
{
	var fromUserId=$.util.getParam("fromUserId");
}else {
	var fromUserId = "{$userId}";
}
var shareLink = buildUrl("html", "photoShare", "index", $.util.getParam("customerId"), {
    actId: $.util.getParamByObject("actId"),
    chanelId: $.util.getParamByObject("chanelId")
}, '&fromUserId=' + fromUserId)

$('.btn').on("click", function() {
    checkactivity(function() {
    	if($.util.getParam("fromUserId"))
        {
            var fd='&fromUserId=' + $.util.getParam("fromUserId");
        }
        else
        {
            var fd="";
        }
        var link = buildUrl("html", "photoShare", "join_now", $.util.getParam("customerId"), {
            actId: $.util.getParamByObject("actId"),
            chanelId: $.util.getParamByObject("chanelId")
        },fd);

        window.location.href=link;
    });
});

var shareData = {
    "title": "{$activity_info.title}",
    "desc": "{$activity_info.description}",
    "link": baseUrl + shareLink,
    "imgUrl": "{$activity_info.picurl}",
    "pkg": {
        "appId": '{$pkg.appId}',
        "timestamp": {$pkg['timestamp']?$pkg['timestamp']:'""'},
        "nonceStr": '{$pkg.nonceStr}',
        "signature": '{$pkg.signature}'
    }
}
$(function() {
    wx_share.init(shareData);
})
</script>

</html>
